home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Perl Multimedia Cyber Classroom
/
PERL Multimedia Cyber Classroom (Prentice Hall)(1998).ISO
/
perlbyex
/
code.jar
/
06ex013.jar
/
code
/
ch06
/
06ex013
/
06ex013.pl
next >
Wrap
Perl Script
|
1998-04-01
|
289b
|
9 lines
#!/usr/bin/perl
# Script: seek_with_read_write
open(FH, "+>joker") || die; # joker is opened for reading and writing
print FH "This line is written to joker.\n";
seek(FH,0,0); # goto the beginning of the file
while(<FH>) {
print; # reads from joker; the line is in $_
}